﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  <link rel="stylesheet" href="../css/uftestsuite.css" type="text/css" />
  <script type="text/javascript" src="long-date.js"></script>
  <script type="text/javascript">
    		
  		function checkDates( valueid, languageid ) {
  			elt1 = document.getElementById(valueid);
  			elt2 = document.getElementById(languageid);
  			
  			longDate = new LongDate( elt1.value, elt2.options[elt2.selectedIndex].value );
  			alert( longDate.toString() );
  		}

  </script>
  
  <title>Long string data patterns</title>
	</head>
<body class="documentation">

  
    日期: 2008年 1月25日
    
    <h1>Long date string pattern</h1>
    
    <h2>Introduction</h2>
    <p>
    xxx</p>
    
   
   
   <h2>Convert a long date string into W3C Note datetime profile</h2>
	    
 
	<form>
		<input id="date1" name="date1" type="text" style="width: 440px" value="Date: 25 January 2008 at 15:30" />
		<select id="language1" name="language1">
				<option value="en">English</option>
				<option value="es">Spanish</option>
				<option value="de">German</option>
				<option value="fr">French</option>
				
			</select>
		<input name="convert" type="button" value="convert" onclick="checkDates('date1','language1')" />
	</form>
	
	<!--
	<h2>Compare</h2>
   	<p>This code takes the two dates and compares them to see if they are equal.  </p>

	<form>
		<input id="date2" name="date2" type="text" style="width: 256px" value="2008-05-30T13:00:00" />
		<input id="date3" name="date3" type="text" style="width: 256px" value="Date: 30 May 2008 at 13:00" />
		<input name="compare" type="button" value="compare" onclick="compareDates('date2','date3')" />
	</form>
	-->
	

	<p>&nbsp;</p>
	
	
	<h2>Design rules</h2>
	<ul>
		<li><strong>MUST</strong> start with the &quot;date-prefix&quot;. In English this 
		is &quot;Date:&quot;</li> 
		<li><strong>MUST</strong> format the date in set order date, month and 
		year</li>
		<li><strong>MUST</strong> use the full month name</li>
		<li><strong>MUST</strong> use a positive full year number. 2008 <strong>
		SHOULD NOT</strong> be abbreviated to 08</li>
		<li>The time <strong>MUST</strong> use 24 hour clock</li>
		<li>The time <strong>MUST</strong> always contain the number of minutes 
		even if that is zero</li>
		<li>Any date without a time zone segment will be considered to be UTC&nbsp;&nbsp; </li>
		<li><strong>MUST</strong> use the &quot;time-prefix&quot; phase between date 
		and time. In English this is &quot;at&quot; </li>
		<li>If date has a time zone segment the time <strong>MUST</strong> be 
		followed by a comma, a space and the &quot;time-zone-prefix&quot;</li>
		<li>The time zone number <strong>MUST</strong> be prefixed with a + or - 
		symbol </li>
		<li>The time zone number <strong>MUST</strong> contain the number of 
		minutes even if that is zero</li>
	</ul>
	
	<h2>Examples of long date string format</h2>

<pre>
Date: 25 January 2008
Date: 25 January 2008 at 15:30 
Date: 25 January 2008 at 15:30, Time zone +1:30
</pre>

	<h2>Examples of long date string format in HTML</h2>

<pre>
English
&lt;abbr class=&quot;dtstart&quot; title=&quot;Date: 25 January 2008&quot;&gt;Jan 25 08&lt;/abbr&gt;
&lt;abbr class=&quot;dtstart&quot; title=&quot;Date: 25 January 2008 at 15:30&quot;&gt;Jan 25 08&lt;/abbr&gt;
&lt;abbr class=&quot;dtstart&quot; title=&quot;Date: 25 January 2008 at 15:30, Time zone +1:00&quot;&gt;Jan 25 08&lt;/abbr&gt;

Spanish
&lt;abbr lang=&quot;es&quot; class=&quot;dtstart&quot; title=&quot;Fecha: 25 Enero 2008&quot;&gt;Enero 25 2008&lt;/abbr&gt;
&lt;abbr lang=&quot;es&quot; class=&quot;dtstart&quot; title=&quot;Fecha: 25 Enero 2008 a las 15:30&quot;&gt;Enero 25 08&lt;/abbr&gt;
&lt;abbr lang=&quot;es&quot; class=&quot;dtstart&quot; title=&quot;Fecha: 25 Enero 2008 a las 15:30, Zona horaria +1:00&quot;&gt;Enero 25 08&lt;/abbr&gt;

German
&lt;abbr lang=&quot;de&quot; class=&quot;dtstart&quot; title=&quot;Datum: 25 Januar 2008&quot;&gt;Jan 25 08&lt;/abbr&gt;
&lt;abbr lang=&quot;de&quot; class=&quot;dtstart&quot; title=&quot;Datum: 25 Januar 2008 um 15:30&quot;&gt;Jan 25 08&lt;/abbr&gt;
&lt;abbr lang=&quot;de&quot; class=&quot;dtstart&quot; title=&quot;Datum: 25 Januar 2008 um 15:30, Zeitzone +1:00&quot;&gt;Jan 25 08&lt;/abbr&gt;

French
&lt;abbr lang=&quot;fr&quot; class=&quot;dtstart&quot; title=&quot;Date: 25 janvier 2008&quot;&gt;Jan 25 08&lt;/abbr&gt;
&lt;abbr lang=&quot;fr&quot; class=&quot;dtstart&quot; title=&quot;Date: 25 janvier 2008 à 15:30&quot;&gt;Jan 25 08&lt;/abbr&gt;
&lt;abbr lang=&quot;fr&quot; class=&quot;dtstart&quot; title=&quot;Date: 25 janvier 2008 à 15:30, décalage horaire +1:00&quot;&gt;Jan 25 08&lt;/abbr&gt;

</pre>



	<h2>JSON long date string language descriptions</h2>

<pre>
{
"language-name" : "English", 
"language-codes" : ["en"], 
"date-prefix" : "Date", 
"time-prefix": "at",
"time-zone-prefix": "Time zone",
"month-names": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
}

{
"language-name" : "Spanish", 
"language-codes" : ["es"], 
"date-prefix" : "Fecha", 
"time-prefix": "a las"
"time-zone-prefix": "Zona horaria",
"month-names": ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"]
}

{
"language-name" : "German", 
"language-codes" : ["de"],   
"date-prefix" : "Datum", 
"time-prefix": "um"
"time-zone-prefix": "Zeitzone",
"month-names": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"]
}

{
"language-name" : "French", 
"language-codes" : ["fr"],   
"date-prefix" : "Date", 
"time-prefix": "à"
"time-zone-prefix": "décalage horaire",
"month-names": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "novembre", "décembre"]
}


</pre>

	
		
	<p>&nbsp;</p>

	<a rel="license" href="license.txt">Some rights reserved</a>
    
    
</body>
</html>
